package cn.com.guanying.android.ui.adapter;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import cn.com.guanying.R;
import cn.com.guanying.javacore.v11.models.CinemaInfo;

public class NearbyCinemaAdapter extends BaseAdapter {

	private ArrayList<CinemaInfo> mCinemas = new ArrayList<CinemaInfo>();
	private Context mContext;
	private LayoutInflater mLayoutInflater;
	public NearbyCinemaAdapter(Context context){
		mContext = context;
		mLayoutInflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	}
	public int getCount() {
		return mCinemas.size();
	}
	public void setmCinemas(ArrayList<CinemaInfo> mCinemas) {
		this.mCinemas = mCinemas;
	}
	public Object getItem(int position) {
		return mCinemas.get(position);
	}
	public long getItemId(int position) {
		return position;
	}
	public View getView(int position, View convertView, ViewGroup parent) {
		if(convertView==null)
			convertView = mLayoutInflater.inflate(R.layout.item_nearby_cinema_list, null);
		return convertView;
	}
	
	}
